package cn.yikaojiuguo.student.ui.base;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;

import butterknife.ButterKnife;
import cn.yikaojiuguo.student.R;

/**
 * Created by cfan_yang on 2015/12/8.
 */
public abstract class BaseLoginActivity extends CustomerActionBarActivity implements View.OnClickListener{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setCustomerTitleVisibility(false);
        setCustomerBackgroundColor(getResources().getColor(R.color.background_login));
        setDividerVisibility(false);
        setCustomerBackImage(R.drawable.my_actionbar_back_white);
        if(!TextUtils.isEmpty(getOperationText())){
            setCustomerOperationText(getOperationText());
        }
        setCustomerOperationTextColor(getResources().getColor(R.color.text_white));
        setCustomerOperationOnClickListener(this);
        setCustomerBackOnclickListener(this);
        ButterKnife.unbind(this);
    }

    /**
     * 获取ActionBar右侧显示文本，由子类实现
     * @return
     */
    protected abstract String getOperationText();
}
